/*     */ package com.feeyin.radar.sys.controller;
/*     */ 
/*     */ import com.feeyin.radar.sys.form.DictionaryForm;
/*     */ import com.feeyin.radar.sys.service.DataDictionaryService;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import javax.servlet.http.HttpServletRequest;
/*     */ import javax.servlet.http.HttpServletResponse;
/*     */ import javax.servlet.http.HttpSession;
/*     */ import org.springframework.web.servlet.ModelAndView;
/*     */ import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
/*     */ import org.springframework.web.servlet.view.RedirectView;
/*     */ 
/*     */ public class DictionarySetController extends MultiActionController
/*     */ {
/*     */   private DataDictionaryService dataDictionaryService;
/*     */   private String dictionarySet;
/*     */   private String linkmanDictionary;
/*     */   private String otherDictionary;
/*     */   private String addRange;
/*     */ 
/*     */   public DataDictionaryService getDataDictionaryService()
/*     */   {
/*  32 */     return this.dataDictionaryService;
/*     */   }
/*     */ 
/*     */   public void setDataDictionaryService(DataDictionaryService dataDictionaryService) {
/*  36 */     this.dataDictionaryService = dataDictionaryService;
/*     */   }
/*     */ 
/*     */   public String getDictionarySet() {
/*  40 */     return this.dictionarySet;
/*     */   }
/*     */ 
/*     */   public void setDictionarySet(String dictionarySet) {
/*  44 */     this.dictionarySet = dictionarySet;
/*     */   }
/*     */ 
/*     */   public String getLinkmanDictionary() {
/*  48 */     return this.linkmanDictionary;
/*     */   }
/*     */ 
/*     */   public void setLinkmanDictionary(String linkmanDictionary) {
/*  52 */     this.linkmanDictionary = linkmanDictionary;
/*     */   }
/*     */ 
/*     */   public String getOtherDictionary() {
/*  56 */     return this.otherDictionary;
/*     */   }
/*     */ 
/*     */   public void setOtherDictionary(String otherDictionary) {
/*  60 */     this.otherDictionary = otherDictionary;
/*     */   }
/*     */ 
/*     */   public String getAddRange() {
/*  64 */     return this.addRange;
/*     */   }
/*     */ 
/*     */   public void setAddRange(String addRange) {
/*  68 */     this.addRange = addRange;
/*     */   }
/*     */ 
/*     */   public ModelAndView display(HttpServletRequest request, HttpServletResponse reponse)
/*     */   {
/*  73 */     Map map = new HashMap();
/*  74 */     map.put("result", request.getParameter("result"));
/*  75 */     map.put("customerInfos", this.dataDictionaryService.getCustomerDictionarys());
/*  76 */     return new ModelAndView(getDictionarySet(), map);
/*     */   }
/*     */ 
/*     */   public ModelAndView saveCustomerInfo(HttpServletRequest request, HttpServletResponse reponse, DictionaryForm dictionaryForm)
/*     */   {
/*  81 */     boolean result = false;
/*  82 */     int success = 0;
/*  83 */     Integer language = (Integer)request.getSession().getAttribute("language");
/*  84 */     String[] selectIds = request.getParameterValues("cid");
/*     */ 
/*  86 */     if ((language != null) && (dictionaryForm != null)) {
/*  87 */       result = this.dataDictionaryService.updateCustomerDictionarySet(selectIds, dictionaryForm, language.intValue());
/*  88 */       if (result) success = 1;
/*     */     }
/*     */ 
/*  91 */     return new ModelAndView(new RedirectView("./dictionarySet.do?action=display&result=" + success));
/*     */   }
/*     */ 
/*     */   public ModelAndView linkmanInfo(HttpServletRequest request, HttpServletResponse reponse)
/*     */   {
/*  96 */     Map map = new HashMap();
/*  97 */     map.put("result", request.getParameter("result"));
/*  98 */     map.put("linkmanInfos", this.dataDictionaryService.getLinkmanDictionarys());
/*  99 */     return new ModelAndView(getLinkmanDictionary(), map);
/*     */   }
/*     */ 
/*     */   public ModelAndView saveLinkmanInfo(HttpServletRequest request, HttpServletResponse reponse, DictionaryForm dictionaryForm)
/*     */   {
/* 104 */     boolean result = false;
/* 105 */     int success = 0;
/* 106 */     Integer language = (Integer)request.getSession().getAttribute("language");
/* 107 */     String[] selectIds = request.getParameterValues("cid");
/*     */ 
/* 109 */     if ((language != null) && (dictionaryForm != null)) {
/* 110 */       result = this.dataDictionaryService.updateLinkmanDictionarySet(selectIds, dictionaryForm, language.intValue());
/* 111 */       if (result) success = 1;
/*     */     }
/*     */ 
/* 114 */     return new ModelAndView(new RedirectView("./dictionarySet.do?action=linkmanInfo&result=" + success));
/*     */   }
/*     */ 
/*     */   public ModelAndView otherInfo(HttpServletRequest request, HttpServletResponse reponse)
/*     */   {
/* 119 */     Map map = new HashMap();
/* 120 */     map.put("result", request.getParameter("result"));
/* 121 */     map.put("otherInfos", this.dataDictionaryService.getOtherDictionarys());
/* 122 */     return new ModelAndView(getOtherDictionary(), map);
/*     */   }
/*     */ 
/*     */   public ModelAndView saveOtherInfo(HttpServletRequest request, HttpServletResponse reponse, DictionaryForm dictionaryForm)
/*     */   {
/* 127 */     boolean result = false;
/* 128 */     int success = 0;
/* 129 */     Integer language = (Integer)request.getSession().getAttribute("language");
/*     */ 
/* 131 */     if ((language != null) && (dictionaryForm != null)) {
/* 132 */       result = this.dataDictionaryService.updateOtherDictionarySet(dictionaryForm, language.intValue());
/* 133 */       if (result) success = 1;
/*     */     }
/*     */ 
/* 136 */     return new ModelAndView(new RedirectView("./dictionarySet.do?action=otherInfo&result=" + success));
/*     */   }
/*     */ }

/* Location:           C:\Users\e547415\MyProject\rone\WEB-INF\classes\
 * Qualified Name:     com.feeyin.radar.sys.controller.DictionarySetController
 * JD-Core Version:    0.6.0
 */